// 语言包
var chi = require('../../utils/Chinese.js')
var eng = require("../../utils/English.js")
//获取应用实例
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    language:'',
    // 语言包对象
    content: '',
    mode:'微信支付',
    price:'127',
    success:true,
    fail:false,
  },
  on:function(){
    let that = this
    that.setData({
      language:app.data.language, 
    })
    var lastLanuage = that.data.language
    if(lastLanuage == 'zh_CN'){
      that.setData({
        content: chi.content,
      })
      wx.setNavigationBarTitle({
        title: '订单信息' 
      })
    }else if(lastLanuage == 'zh_EN'){
      that.setData({
        content: eng.content,
      })
      // 修改导航标题
      wx.setNavigationBarTitle({
        title: 'Order Information' 
      })
    }
  },
  // 页面跳转
  order:function(){
    wx.navigateTo({
      url: '../order_detail/order_detail',
    })
  },
  index:function(){
    wx.switchTab({  
      url:'../index/index'  
      });  
  },
  continue:function(){
    // 继续支付
    wx.navigateTo({
      url: '../order_detail/order_detail',
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    that.on()
  },
 
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    let that = this
    that.on()
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})